package com.example.demo.entity;

import org.hibernate.validator.constraints.Range;

public class User {
    private String userName;
    @Range(min=0, max=1, message = "年龄18-20")
    private Integer age=18;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
